var status = -1;
var selectionLog = [];

function action(mode, type, selection) {
    var reactor = "action" + (cm.getMapId() - 350132500);
    eval(reactor)(mode, type, selection)
}

function action0(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240165, 1, 1641, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1403, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1150, 0, 100);
            cm.spawnMobLimit(8240165, 1, 932, 0, 100);
            cm.spawnMobLimit(8240165, 1, 674, 0, 100);
            cm.spawnMobLimit(8240165, 1, 435, 0, 100);
            cm.spawnMobLimit(8240165, 1, 200, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1785, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1518, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1310, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1054, 0, 100);
            cm.spawnMobLimit(8240164, 1, 822, 0, 100);
            cm.spawnMobLimit(8240164, 1, 539, 0, 100);
            cm.spawnMobLimit(8240164, 1, 332, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/1");
            cm.spawnMobLimit(8240164, 1, 357, 0, 100);
            cm.addPopupSay(1540878, 1000, "#face4#魔族部队什么时候到这儿来了！", "", 0);
            cm.addPopupSay(1540880, 1000, "#face6#根本看不到尽头。看这气势，估计出入口已经被占领了。", "", 0);
            cm.addPopupSay(1540879, 1000, "#face8#没办法。要想逃离这里……", "", 0);
            cm.addPopupSay(1540878, 1000, "#face4#返回阿布拉克萨斯，跟战神和龙神汇合吧！", "", 0);
            cm.spawnMobLimit(8240165, 1, -87, 0, 100);
            cm.spawnMobLimit(8240165, 1, -136, 0, 100);
            cm.spawnMobLimit(8240165, 1, -982, 0, 100);
            cm.spawnMobLimit(8240165, 1, -281, 0, 100);
            cm.spawnMobLimit(8240165, 1, -788, 0, 100);
            cm.spawnMobLimit(8240164, 1, -457, 0, 100);
            cm.spawnMobLimit(8240164, 1, -106, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1001, 0, 100);
            cm.spawnMobLimit(8240165, 1, -548, 0, 100);
            cm.spawnMobLimit(8240165, 1, -1146, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1347, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1927, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1163, 0, 100);
            cm.addPopupSay(1540878, 1000, "#face3#我有一种不祥的预感。\r\n必须赶快离开这里！", "", 0);
            cm.addPopupSay(1540796, 1000, "不能让他过去！\r\n决不能放他过去！", "", 0);
            cm.addPopupSay(1540878, 1000, "#face3#妨碍我了，让开！", "", 0);
            cm.dispose()
        }
    }
}

function action100(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240165, 1, 1641, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1403, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1150, 0, 100);
            cm.spawnMobLimit(8240165, 1, 932, 0, 100);
            cm.spawnMobLimit(8240165, 1, 674, 0, 100);
            cm.spawnMobLimit(8240165, 1, 435, 0, 100);
            cm.spawnMobLimit(8240165, 1, 200, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1785, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1518, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1310, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1054, 0, 100);
            cm.spawnMobLimit(8240164, 1, 822, 0, 100);
            cm.spawnMobLimit(8240164, 1, 539, 0, 100);
            cm.spawnMobLimit(8240164, 1, 332, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/2");
            cm.spawnMobLimit(8240165, 1, 1012, 0, 100);
            cm.spawnMobLimit(8240165, 1, 418, 0, 100);
            cm.spawnMobLimit(8240165, 1, 508, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1012, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1012, 0, 100);
            cm.spawnMobLimit(8240164, 1, 418, 0, 100);
            cm.spawnMobLimit(8240164, 1, 335, 0, 100);
            cm.spawnMobLimit(8240165, 1, 285, 0, 100);
            cm.addPopupSay(1540879, 1000, "#face8#在这里没什么事了吧？\r\n那就赶紧闪开！", "", 0);
            cm.addPopupSay(1540796, 1000, "不，现在不能通过这里！", "", 0);
            cm.addPopupSay(1540879, 1000, "#face8#真是讲不通，那就只能动用武力了！", "", 0);
            cm.spawnMobLimit(8240165, 1, -104, 0, 100);
            cm.spawnMobLimit(8240165, 1, -403, 0, 100);
            cm.spawnMobLimit(8240165, 1, -230, 0, 100);
            cm.spawnMobLimit(8240164, 1, 84, 0, 100);
            cm.spawnMobLimit(8240164, 1, 246, 0, 100);
            cm.spawnMobLimit(8240164, 1, -223, 0, 100);
            cm.spawnMobLimit(8240165, 1, -612, 0, 100);
            cm.spawnMobLimit(8240164, 1, -320, 0, 100);
            cm.spawnMobLimit(8240164, 1, 151, 0, 100);
            cm.spawnMobLimit(8240165, 1, -240, 0, 100);
            cm.spawnMobLimit(8240165, 1, -240, 0, 100);
            cm.spawnMobLimit(8240164, 1, -240, 0, 100);
            cm.spawnMobLimit(8240164, 1, -240, 0, 100);
            cm.spawnMobLimit(8240164, 1, -240, 0, 100);
            cm.addPopupSay(1540797, 1000, "一步也不能后退！", "", 0);
            cm.addPopupSay(1540796, 1000, "阻止他们！", "", 0);
            cm.spawnMobLimit(8240165, 1, -1238, 0, 100);
            cm.dispose()
        }
    }
}

function action200(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240165, 1, 1641, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1403, 0, 100);
            cm.spawnMobLimit(8240165, 1, 1150, 0, 100);
            cm.spawnMobLimit(8240165, 1, 932, 0, 100);
            cm.spawnMobLimit(8240165, 1, 674, 0, 100);
            cm.spawnMobLimit(8240165, 1, 435, 0, 100);
            cm.spawnMobLimit(8240165, 1, 200, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1785, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1518, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1310, 0, 100);
            cm.spawnMobLimit(8240164, 1, 1054, 0, 100);
            cm.spawnMobLimit(8240164, 1, 822, 0, 100);
            cm.spawnMobLimit(8240164, 1, 539, 0, 100);
            cm.spawnMobLimit(8240164, 1, 332, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/final");
            cm.addPopupSay(1540880, 1000, "#face3#超越石竟然落到军团长的手里了……", "", 0);
            cm.addPopupSay(1540879, 1000, "#face3#看样子我们完全被那家伙给算计了。", "", 0);
            cm.spawnMobLimit(8240165, 1, -144, 0, 100);
            cm.spawnMobLimit(8240165, 1, -5, 0, 100);
            cm.spawnMobLimit(8240165, 1, -285, 0, 100);
            cm.spawnMobLimit(8240165, 1, -768, 0, 100);
            cm.spawnMobLimit(8240164, 1, -430, 0, 100);
            cm.spawnMobLimit(8240164, 1, -214, 0, 100);
            cm.spawnMobLimit(8240164, 1, -556, 0, 100);
            cm.spawnMobLimit(8240164, 1, -666, 0, 100);
            cm.spawnMobLimit(8240165, 1, -1741, 0, 100);
            cm.spawnMobLimit(8240165, 1, -1378, 0, 100);
            cm.spawnMobLimit(8240165, 1, -1209, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1927, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1213, 0, 100);
            cm.spawnMobLimit(8240164, 1, -1190, 0, 100);
            cm.addPopupSay(1540878, 1000, "#face4#离开这里后立即联络龙神方面，幻影。", "", 0);
            cm.addPopupSay(1540879, 1000, "#face8#知道了！", "", 0);
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};